package com.atguigu.jxc.service;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.Goods;

import java.util.Map;

public interface GoodsService {


    ServiceVO getCode();


    /**
     * 首页分页查询
     * @param page
     * @param rows
     * @param codeOrName
     * @param goodsTypeId
     * @return
     */
    Map<String, Object> pageGoods(Integer page, Integer rows, String codeOrName, Integer goodsTypeId);

    /**
     * 添加或更新商品信息
     * @param goods
     */
    void saveOrUpdateGoods(Goods goods);

    /**
     *
     * @param goodsId
     */
    void delete(Integer goodsId);

    /**
     *
     * @param page
     * @param rows
     * @param nameOrCode
     * @return
     */
    Map<String, Object> getNoInventoryQuantity(Integer page, Integer rows, String nameOrCode);

    /**
     *
     * @param page
     * @param rows
     * @param nameOrCode
     * @return
     */
    Map<String, Object> getHasInventoryQuantity(Integer page, Integer rows, String nameOrCode);

    /**
     *
     * @param goodsId
     * @param inventoryQuantity
     * @param purchasingPrice
     */
    void saveStock(Integer goodsId, Integer inventoryQuantity, double purchasingPrice);


    Map<String, Object> listAlarm();
}
